/*
 * @Author: wangming
 * @Date: 2021-10-15 17:56:10
 * @LastEditors: wangming
 * @LastEditTime: 2022-08-02 10:28:03
 * @FilePath: /hanma-application-designer-fed/src/pages/designUniversal/__components__/dynamicForm/syllabus/components/module.config.js
 * @Description: 
 */
import { FormDataJSON, hlcustomBtn } from "@/pageConfig/index.js";
import { uuid } from "@/utils/common.js";
import { cloneDeep } from "lodash";
export function newform(modalType = undefined) {
  let key = uuid(4)
  return {
    key: "modal_" + key,
    directionType: 'dialog',//弹框类型  //drawer抽屉  //dialog 弹框
    name: "", //弹框名称
    width: "680", //弹框宽度
    unit: "px",//抽屉百分比
    direction: 'rtl', //抽屉弹出方向
    formList: [], //main主页面内容
    closeOnModal: false,// 点击关闭
    dialogDrag: false,// 弹框可移动
    modalType,//弹框类型 默认 undefined 普通弹框   业务 'business' 业务弹框设计页面没有左侧操作面板
    FormData: { ...FormDataJSON, key: "modal_" + key, buttonLayout: { ...cloneDeep(hlcustomBtn), key: "btn_" + key } }, //FormData内的key 用于生成css 标签使用
  }
}

export const TemplateButtons = [
  {
    label: "弹框列表选择",
    tagName: 'hlListSelect',
  },
  {
    label: "弹框树形列表选择",
    tagName: 'hlTreeListSelect',
  },
];